package com.cq.mapper;

import com.cq.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 悠久的苍穹
 * @Date: 2021/1/14 15:47
 * @Description: 角色数据层
 * @Version: 1.0
 */
@Mapper
@Repository
public interface RoleMapper {
    Role findRoleByAdminId(@Param("id") Integer id);

    List<Role> getRoleList();

    int addAdminRole(@Param("adminId") Integer adminId, @Param("roleId") Integer roleId);

    int updateAdminRole(@Param("adminId") Integer adminId, @Param("roleId") Integer roleId);

    void deleteRoleById(@Param("id") int id);

    Role findRoleById(@Param("id") int id);

    int updateRole(Role role);

    int addRole(Role role);

    void deleteRole(@Param("id") Integer id);
}
